class Solution:
    def isPossibleToSplit(self, nums: List[int]) -> bool:
        cnt = Counter(nums)
        # 利用most_common函数对cnt元组按值排序，值最大应不大于2+
        return cnt.most_common()[0][1]<=2

if __name__ == "__main__":
    s = Solution()
    print(s.isPossibleToSplit(nums = [1,1,2,2,3,4]) == True)
    print(s.isPossibleToSplit(nums = [1,1,1,1]) == False)